﻿@model Fmis21_10.Models.Match

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Layout.cshtml";
}

<h2>Create</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Match</legend>
        <table><tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.HomeTeam)
        </td>
            
        <td class="editor-field">
            <select id="HomeTeam" name="HomeTeam">
               @Html.Raw(ViewBag.selectTeam)

            </select>
            @*@Html.ValidationMessageFor(model => model.HomeTeam)*@
        </td>
            
                <td class="editor-field">
            <select id="AwayTeam" name="AwayTeam">
               @Html.Raw(ViewBag.selectTeam)

            </select>
            @*@Html.ValidationMessageFor(model => model.AwayTeam)*@
        </td>
        <td class="editor-label">
            @Html.LabelFor(model => model.AwayTeam)
        </td>
        
            </tr><tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.ScoreHomeTeam)
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.ScoreHomeTeam)
            @Html.ValidationMessageFor(model => model.ScoreHomeTeam)
        </td>
                <td class="editor-field">
            @Html.EditorFor(model => model.ScoreAwayTeam)
            @Html.ValidationMessageFor(model => model.ScoreAwayTeam)
        </td>
        <td class="editor-label">
            @Html.LabelFor(model => model.ScoreAwayTeam)
        </td>
           
        
                </tr>
             </table>
        <div class="editor-label">
            @Html.LabelFor(model => model.Round)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Round)
            @Html.ValidationMessageFor(model => model.Round)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TournamentId, "Tournament")
        </div>
        <div class="editor-field">
            @Html.DropDownList("TournamentId", String.Empty)
            @Html.ValidationMessageFor(model => model.TournamentId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.StadiumId, "Stadium")
        </div>
        <div class="editor-field">
            @Html.DropDownList("StadiumId", String.Empty)
            @Html.ValidationMessageFor(model => model.StadiumId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Type)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Type)
            @Html.ValidationMessageFor(model => model.Type)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Time)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Time)
            @Html.ValidationMessageFor(model => model.Time)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Location)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Location)
            @Html.ValidationMessageFor(model => model.Location)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Weather)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Weather)
            @Html.ValidationMessageFor(model => model.Weather)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.MatchSupervision)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MatchSupervision)
            @Html.ValidationMessageFor(model => model.MatchSupervision)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.RefereeSupervision)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.RefereeSupervision)
            @Html.ValidationMessageFor(model => model.RefereeSupervision)
        </div>

        
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
    
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
